const request = uni.$u.http

// 验证码快捷登录 或注册
export const quick = data => request.post('/api/m/user/quick', data)

// 账号密码登录
export const login = data => request.post('/api/m/user/login', data)


// 验证码快捷修改密码
export const quickUpdatePassword = data => request.patch('/api/m/user/quickUpdatePassword', data)

// 修改用户信息 根据id修改
export const editUser = (id, data) => request.put(`/api/m/user/${id}`, data)

// 关注文章作者
export const addUserFollowings = data => request.post('/api/m/user/focus', data)

// 取消关注文章作者
export const deleteUserFollowings = id => request.delete(`/api/m/user/focus/${id}`)

// 根据文章作者user_id获取关注信息
export const isWage = id => request.get(`/api/m/user/focus/${id}`)

// 获取用户主页个人信息
export const getUserHomePage = id => request.get(`/api/m/user/HomePage/${id}`)